package com.handsome.职责链模式;

/**
 * @author niechun
 * @date 2023/3/27 21:04
 */
public abstract class ApproveHandler {
    private String name;
    /**
     * 下一个处理者
     */
    private ApproveHandler handler;

    public ApproveHandler(String name) {
        this.name = name;
    }

    public ApproveHandler getHandler() {
        return handler;
    }

    public void setHandler(ApproveHandler handler) {
        this.handler = handler;
    }

    public abstract void processRequest(PurchaseRequest request);

    public String getName() {
        return name;
    }
}
